# $Id: PKGBUILD 83383 2013-01-30 21:46:09Z jlichtblau $
# Maintainer: Jaroslav Lichtblau <dragonlord@aur.archlinux.org>
# Contributor: Ray Rashif <schiv@archlinux.org
# Contributor: Andrea Scarpino <andrea@archlinux.org>
# Contributor: Douglas Soares de Andrade <dsa@aur.archlinux.org>

pkgname=tellico
pkgver=2.3.7
pkgrel=1
pkgdesc="A collection manager for KDE"
arch=('i686' 'x86_64')
url="http://tellico-project.org/"
license=('GPL')
depends=('kdebase-workspace' 'yaz' 'exempi' 'libksane' 'taglib' 'libkcddb' 'poppler-qt' 'kdemultimedia-audiocd-kio')
makedepends=('automoc4' 'cmake')
install=$pkgname.install
changelog=$pkgname.changelog
source=(http://tellico-project.org/files/${pkgname}-${pkgver}.tar.bz2)
sha256sums=('ae858559a226df380940dbd0d8378c45fd6c382359ccebe10f94c2687d6219a1')

build() {
  cd ${srcdir}

  mkdir build
  cd build
  cmake ../${pkgname}-${pkgver} -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr
  make
}

package() {
  cd ${srcdir}/build

  make DESTDIR=${pkgdir} install

# fix python 2.7 path
  find ${pkgdir} -iname "*.py" | xargs sed -i 's|#!/usr/bin/env python|#!/usr/bin/env python2|'
}
